{% comment %}
#    Copyright 2012 New Mexico EPSCoR
#
#    This file is part of Teacher's P.E.T.
#
#    Teacher's P.E.T. is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    Teacher's P.E.T. is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with Teacher's P.E.T..  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}

<div class="form_container">
	{% if TheTemplate %}<h1>Edit Activity Template</h1>
	{% else %}<h1>Create Activity Template</h1>
	{% endif %}
	
    {# Floating Save Button #}
    <form action="." method="post">{% csrf_token %}
    <button type="submit" class="button SaveButton" name="Save" value="Save" style="position: fixed; bottom: 0px; right: 0px; z-index: 5;" title="Save Current Progress">Save</button>
    
    {# Title #}
	<table>
	    <tr>
		<th>{{TemplateForm.category.label_tag}}</th><td>{{TemplateForm.category}}<br>{{TemplateForm.category.help_text}}</td><td><span class="errorlist">{% for error in TemplateForm.category.errors %}{{error|escape}} {% endfor %}</span></td>
	    </tr>
	    <tr>
		<th>{{TemplateForm.title.label_tag}}</th><td>{{TemplateForm.title}}<br>{{TemplateForm.title.help_text}}</td><td><span class="errorlist">{% for error in TemplateForm.title.errors %}{{error|escape}} {% endfor %}</span></td>
	    </tr>
	    <tr>
		<th>{{TemplateForm.description.label_tag}}</th><td>{{TemplateForm.description}}<br>{{TemplateForm.description.help_text}}</td><td><span class="errorlist">{% for error in TemplateForm.description.errors %}{{error|escape}} {% endfor %}</span></td>
	    </tr>
		<tr>
		<th>{{TemplateForm.example.label_tag}}</th><td>{{TemplateForm.example}}<br>{{TemplateForm.example.help_text}}</td><td><span class="errorlist">{% for error in TemplateForm.example.errors %}{{error|escape}} {% endfor %}</span></td>
	    </tr>
	    <tr>
		<th>{{TemplateForm.content.label_tag}}</th><td>{{TemplateForm.content}}<br>{{TemplateForm.content.help_text}}</td><td><span class="errorlist">{% for error in TemplateForm.content.errors %}{{error|escape}} {% endfor %}</span></td>
	    </tr>
	</table>
	<table>
	    <tr>
		<td class="Buttons">
		<button type="submit" class="button SaveButton floatleft" name="Save" value="SaveEdit" title="Save and Continue Editing">Save and Continue</button>
		<button type="submit" class="button SaveButton floatleft" name="Save" value="SaveReturn" title="Save and Return to Activity Management">Save and Return</button>
		<a class="button SaveButton" href="{% course_url management app='activities' %}">Cancel</a>
		</td></tr>
	</table>
    </form>
</div>

